package com.risen.project.aop;

import com.risen.project.annotation.LogMsg;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Slf4j
public class LogMsgAop {

    @Before("@annotation(logMsg)")
    public void before(LogMsg logMsg) {
        log.info("请求接口 {}", logMsg.value());
    }
}
